﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DearLee.Toolkit.Drawing;
using DearLee.Toolkit.Enums;
using DearLee.Toolkit.Globalization;
using DearLee.Toolkit.Math;
using DearLee.Toolkit.Web;
using System.IO;

namespace Web {

  public partial class Index : BasePage {

    protected void Page_Load(object sender, EventArgs e) {

      if (!IsPostBack) {

        BindDdlYearOfBirth(ddlYearOfBirth);
        BindDdlConstellation(ddlConstellation);
        BindDdlBloodType(ddlBloodType);
        BindDdlYesNo(ddlYesNo);
        BindDdlGender(ddlGender);
        BindDdlAge(ddlAge, 119);

        Response.Write(EnumHelper.GetEnumNameByValue(typeof(BloodType), 2) + ", " + EnumHelper.GetEnumValueByName(typeof(BloodType), "AB_型"));
        //imgBefore.Src = "~/img/juno-8.jpg";
        //imgWarterMark.Src = "~/img/burgervag.jpg";
        //string savePath = "~/img/after.jpg";

        //Drawing2DHelper.WaterMark(Server.MapPath(imgBefore.Src),
        //                          Server.MapPath(imgWarterMark.Src),
        //                          Server.MapPath(savePath));

        //imgAfter.Src = savePath;
      }
    }
  }
}
